import { useNavigate } from "react-router-dom"

const PageA = () => {

  const navigate = useNavigate();
  
  function toPageB() {
    navigate('/pageB?kw=中&url=http://xxx.cn/?serach=中&name=c', { replace: false, state: { kw: Date.now(), backUrl: 'http://xxx.com/?search=中' } })
  }

  return <div>
    <h2>PageA</h2>
  </div>
}

export default PageA